package com.woniuxy.hotel.room.service.imp;/**
 * @Author ：Cheng Yl
 * @Date ：Created in 2019/8/6 20:54
 */

import com.woniuxy.hotel.room.mapper.RoomTypeMapper;
import com.woniuxy.hotel.room.pojo.RoomType;
import com.woniuxy.hotel.room.service.RoomTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName RoomTypeServiceImp
 * @Author Cheng Yl
 * @Date 2019/8/6 20:54
 */
@Service
public class RoomTypeServiceImp implements RoomTypeService {
    @Resource
    RoomTypeMapper roomTypeMapper;
    
    @Override
    public List<RoomType> selectAllRoomType () {
        return roomTypeMapper.selectByExample(null);
    }
    
    @Override
    public RoomType selectPrice (Integer typeId) {
        
        return roomTypeMapper.selectByPrimaryKey(typeId);
    }
    
    @Override
    public int updateByPrimaryKey (RoomType roomType) {
       return roomTypeMapper.updateByPrimaryKeySelective(roomType);
    }
}
